<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 6.0.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/wang-cheng/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/wang-cheng/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/wang-cheng/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/wang-cheng/images/logo.svg" color="#222">

<link rel="stylesheet" href="/wang-cheng/css/main.css">


<link rel="stylesheet" href="/wang-cheng/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"cheng-wang123.gitee.io","root":"/wang-cheng/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="牛客网刷题笔记数据库优化问题主键会添加索引， 定长字段有利于查询优化， 将大数据量字段单独放在一个表中可以优化数据库表的存储性能 floor、ceil函数问题123456789101112public class Test &amp;#123;      public static void main(String[] args) &amp;#123;        double[] nums &#x3D; &amp;#123;-">
<meta property="og:type" content="article">
<meta property="og:title" content="做题笔记(一)">
<meta property="og:url" content="https://cheng-wang123.gitee.io/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/index.html">
<meta property="og:site_name" content="诚の博客">
<meta property="og:description" content="牛客网刷题笔记数据库优化问题主键会添加索引， 定长字段有利于查询优化， 将大数据量字段单独放在一个表中可以优化数据库表的存储性能 floor、ceil函数问题123456789101112public class Test &amp;#123;      public static void main(String[] args) &amp;#123;        double[] nums &#x3D; &amp;#123;-">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cheng-wang123.gitee.io/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91.jpg">
<meta property="og:image" content="https://cheng-wang123.gitee.io/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/TCP%E4%B8%8EUDP.png">
<meta property="article:published_time" content="2022-03-23T08:26:18.000Z">
<meta property="article:modified_time" content="2022-05-13T08:06:02.897Z">
<meta property="article:author" content="王诚">
<meta property="article:tag" content="做题笔记">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cheng-wang123.gitee.io/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91.jpg">

<link rel="canonical" href="https://cheng-wang123.gitee.io/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>做题笔记(一) | 诚の博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/wang-cheng/atom.xml" title="诚の博客" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/wang-cheng/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">诚の博客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">记录学习中的点点滴滴</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/wang-cheng/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/wang-cheng/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/wang-cheng/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/wang-cheng/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://cheng-wang123.gitee.io/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/wang-cheng/images/avatar.gif">
      <meta itemprop="name" content="王诚">
      <meta itemprop="description" content="命运对勇士低语，你无法抵御风暴；勇士低声回应，我就是风暴">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="诚の博客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          做题笔记(一)
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2022-03-23 16:26:18" itemprop="dateCreated datePublished" datetime="2022-03-23T16:26:18+08:00">2022-03-23</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-05-13 16:06:02" itemprop="dateModified" datetime="2022-05-13T16:06:02+08:00">2022-05-13</time>
              </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="牛客网刷题笔记"><a href="#牛客网刷题笔记" class="headerlink" title="牛客网刷题笔记"></a><strong>牛客网刷题笔记</strong></h1><h2 id="数据库优化问题"><a href="#数据库优化问题" class="headerlink" title="数据库优化问题"></a><strong>数据库优化问题</strong></h2><p>主键会添加索引， 定长字段有利于查询优化， 将大数据量字段单独放在一个表中可以优化数据库表的存储性能</p>
<h2 id="floor、ceil函数问题"><a href="#floor、ceil函数问题" class="headerlink" title="floor、ceil函数问题"></a><strong>floor、ceil函数问题</strong></h2><figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">Test</span> &#123;   </span><br><span class="line">   <span class="function"><span class="keyword">public</span> <span class="type">static</span> <span class="type">void</span> <span class="title">main</span><span class="params">(<span class="type">String</span>[] args)</span> </span>&#123;   </span><br><span class="line">     <span class="type">double</span>[] nums = &#123;<span class="number">-1.6</span>&#125;;   </span><br><span class="line">     <span class="keyword">for</span> (<span class="type">double</span> num : nums) &#123;   </span><br><span class="line">       <span class="built_in">test</span>(num);   </span><br><span class="line">     &#125;   </span><br><span class="line">   &#125;    </span><br><span class="line">   <span class="function"><span class="keyword">private</span> <span class="type">static</span> <span class="type">void</span> <span class="title">test</span><span class="params">(<span class="type">double</span> num)</span> </span>&#123;   </span><br><span class="line">     System.out.<span class="built_in">println</span>(Math.<span class="built_in">floor</span>(num));   <span class="comment">//-2.0</span></span><br><span class="line">     System.out.<span class="built_in">println</span>(Math.<span class="built_in">ceil</span>(num));   <span class="comment">//-1.0</span></span><br><span class="line">   &#125;   </span><br><span class="line"> &#125;</span><br></pre></td></tr></table></figure>
<p>floor：地板    ——&gt;    向下取整<br>ceil：天花板  ——&gt;    向上取整<br>由于 double 类型，小数点依旧存在</p>
<h2 id="同步锁机制"><a href="#同步锁机制" class="headerlink" title="同步锁机制"></a><strong>同步锁机制</strong></h2><p>在java中，每个对象只能获得一个同步锁</p>
<h2 id="设计模式类问题"><a href="#设计模式类问题" class="headerlink" title="设计模式类问题"></a><strong>设计模式类问题</strong></h2><p>适配器型属于结构型模式</p>
<p>创建型：对象的创建；</p>
<p>结构型：对象的组成；</p>
<p>行为型：对象的功能</p>
<h2 id="数据库引擎类问题"><a href="#数据库引擎类问题" class="headerlink" title="数据库引擎类问题"></a><strong>数据库引擎类问题</strong></h2><p>MySQL数据库引擎取决于MySQL在安装的时候是如何被编译的。要添加一个新的引擎，就必须重新编译MYSQL。在缺省情况下，MYSQL支持三个引擎：<code>ISAM</code>、<code>MYISAM</code>和<code>HEAP</code>。另外两种类型INNODB和BERKLEY（BDB），也常常可以使用。如果技术高超，还可以使用MySQL++ API自己做一个引擎。</p>
<p><code>ISAM</code>：<code>ISAM</code>是一个定义明确且历经时间考验的数据表格管理方法，它在设计之时就考虑到数据库被查询的次数要远大于更新的次数。因此，<code>ISAM</code>执行读取操作的速度很快，而且不占用大量的内存和存储资源。<code>ISAM</code>的两个主要不足之处在于，它不支持事务处理，也不能够容错：如果你的硬盘崩溃了，那么数据文件就无法恢复了。如果你正在把<code>ISAM</code>用在关键任务应用程序里，那就必须经常备份你所有的实时数据，通过其复制特性，MYSQL能够支持这样的备份应用程序。</p>
<p><code>MyISAM</code>：<code>MyISAM</code>是MySQL的ISAM扩展格式和缺省的数据库引擎。除了提供ISAM里所没有的索引和字段管理的大量功能，<code>MyISAM</code>还使用一种表格锁定的机制，来优化多个并发的读写操作，其代价是你需要经常运行OPTIMIZE TABLE命令，来恢复被更新机制所浪费的空间。<code>MyISAM</code>还有一些有用的扩展，例如用来修复数据库文件的MyISAMCHK工具和用来恢复浪费空间的 MyISAMPACK工具。<code>MYISAM</code>强调了快速读取操作，这可能就是为什么MySQL受到了WEB开发如此青睐的主要原因：在WEB开发中你所进行的大量数据操作都是读取操作。所以，大多数虚拟主机提供商和INTERNET平台提供商只允许使用<code>MYISAM</code>格式。<code>MyISAM</code>格式的一个重要缺陷就是不能在表损坏后恢复数据。</p>
<p><code>HEAP</code>：<code>HEAP</code>允许只驻留在内存里的临时表格。驻留在内存里让<code>HEAP</code>要比<code>ISAM</code>和<code>MYISAM</code>都快，但是它所管理的数据是不稳定的，而且如果在关机之前没有进行保存，那么所有的数据都会丢失。在数据行被删除的时候，<code>HEAP</code>也不会浪费大量的空间。<code>HEAP</code>表格在你需要使用SELECT表达式来选择和操控数据的时候非常有用。要记住，在用完表格之后就删除表格。</p>
<p><code>InnoDB</code>：<code>InnoDB</code>数据库引擎都是造就MySQL灵活性的技术的直接产品，这项技术就是MYSQL++ API。在使用MYSQL的时候，你所面对的每一个挑战几乎都源于<code>ISAM</code>和<code>MyISAM</code>数据库引擎不支持事务处理（transaction process）也不支持外来键。尽管要比<code>ISAM</code>和 <code>MyISAM</code>引擎慢很多，但是<code>InnoDB</code>包括了对事务处理和外来键的支持，这两点都是前两个引擎所没有的。如前所述，如果你的设计需要这些特性中的一者 或者两者，那你就要被迫使用后两个引擎中的一个了。</p>
<p>MySQL 官方对<code>InnoDB</code>是这样解释的：<code>InnoDB</code>给MySQL提供了具有提交、回滚和崩溃恢复能力的事务安全（ACID兼容）存储引擎。InnoDB锁定在行级并且也在SELECT语句提供一个Oracle风格一致的非锁定读，这些特色增加了多用户部署和性能。没有在<code>InnoDB</code>中扩大锁定的需要，因为在InnoDB中行级锁定适合非常小的空间。<code>InnoDB</code>也支持FOREIGN KEY强制。在SQL查询中，你可以自由地将<code>InnoDB</code>类型的表与其它MySQL的表的类型混合起来，甚至在同一个查询中也可以混合。</p>
<p><code>InnoDB</code>是为处理巨大数据量时的最大性能设计，它的CPU效率可能是任何其它基于磁盘的关系数据库引擎所不能匹敌的。</p>
<p><code>InnoDB</code>存储引擎被完全与MySQL服务器整合，<code>InnoDB</code>存储引擎为在主内存中缓存数据和索引而维持它自己的缓冲池。<code>InnoDB</code>存储它的表＆索引在一个表空间中，表空间可以包含数个文件（或原始磁盘分区）。这与<code>MyISAM</code>表不同，比如在<code>MyISAM</code>表中每个表被存在分离的文件中。<code>InnoDB</code> 表可以是任何尺寸，即使在文件尺寸被限制为2GB的操作系统上。<code>InnoDB</code>默认地被包含在MySQL二进制分发中。Windows Essentials installer使<code>InnoDB</code>成为Windows上MySQL的默认表。<code>InnoDB</code>被用来在众多需要高性能的大型数据库站点上产生。著名的Internet新闻站点Slashdot.org运行在<code>InnoDB</code>上。 Mytrix, Inc.在<code>InnoDB</code>上存储超过1TB的数据，还有一些其它站点在<code>InnoDB</code>上处理平均每秒800次插入/更新的</p>
<p>一般来说，<code>MyISAM</code>适合：(1)做很多count 的计算；(2)插入不频繁，查询非常频繁；(3)没有事务。<code>InnoDB</code>适合：(1)可靠性要求比较高，或者要求事务；(2)表更新和查询都相当的频繁，并且表锁定的机会比较大的情况</p>
<h2 id="SQL中limit用法"><a href="#SQL中limit用法" class="headerlink" title="SQL中limit用法"></a><strong>SQL中limit用法</strong></h2><figure class="highlight n1ql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> * <span class="keyword">from</span> tableName <span class="keyword">limit</span> i,n</span><br></pre></td></tr></table></figure>
<p>tableName : 为数据表；<br>i : 为查询结果的索引值（默认从0开始）；<br>n : 为查询结果返回的数量</p>
<figure class="highlight axapta"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> * <span class="keyword">from</span> student limit <span class="number">1</span> <span class="comment">//查询第一条数据</span></span><br></pre></td></tr></table></figure>
<h2 id="完全二叉树"><a href="#完全二叉树" class="headerlink" title="完全二叉树"></a><strong>完全二叉树</strong></h2><p>一棵深度为k的有n个结点的二叉树，对树中的结点按从上至下、从左到右的顺序进行编号，如果编号为i（1≤i≤n）的结点与满二叉树中编号为i的结点在二叉树中的位置相同，则这棵二叉树称为完全二叉树。</p>
<img src="/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91.jpg" class title="完全二叉树">
<h2 id="堆排序"><a href="#堆排序" class="headerlink" title="堆排序"></a><strong>堆排序</strong></h2><p>堆：n个元素的序列{k1,k2…,kn}，当且仅当满足下列关系时，称之为堆。</p>
<script type="math/tex; mode=display">
  \begin{Bmatrix}
    ki <= k2i \\
    ki <= k2i+1 \\
   \end{Bmatrix}</script><p>或者</p>
<script type="math/tex; mode=display">
  \begin{Bmatrix}
    ki >= k2i \\
    ki >= k2i+1 \\
   \end{Bmatrix}</script><ol>
<li><p>最小(大)堆的排序规则:将根节点(最小(大)值)摘除堆，并将最后一个节点放置到根节点</p>
</li>
<li><p>随后进行堆的检查，如果不符合最小(大)堆，则将不符合的最小(大)子节点与之交换，然后重复第二步，直到符合最小(大)堆</p>
</li>
<li><p>重复第一步，直到节点全部摘除</p>
</li>
</ol>
<h2 id="二叉树转堆"><a href="#二叉树转堆" class="headerlink" title="二叉树转堆"></a><strong>二叉树转堆</strong></h2><p>二叉树转最大(小)堆的的规则：</p>
<ol>
<li><p>首先自下而上、自右向左依次开始检查节点是否符合规则。如果不符合，则将其与最大(小)的叶子节点进行交换</p>
</li>
<li><p>检查被交换后的节点是否符合最大(小)堆，如果不符合，则继续进行交换 </p>
</li>
<li><p>交换后继续向左检查节点是否符合最大(小)堆，如果当前层检查完毕，则向上检查，从最右节点开始。</p>
</li>
<li><p>直到检查到根节点，至此，转换结束。</p>
</li>
</ol>
<h2 id="快速排序算法"><a href="#快速排序算法" class="headerlink" title="快速排序算法"></a><strong>快速排序算法</strong></h2><ol>
<li><p>选定Pivot中心轴(任意一个数字)</p>
</li>
<li><p>将大于Pivot的数字放在Pivot的右边</p>
</li>
<li><p>将小于Pivot的数字放在Pivot的左边</p>
</li>
<li><p>分别对左右子序列重复前三步操作</p>
</li>
</ol>
<figure class="highlight reasonml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">int</span> <span class="constructor">Partition(SqList &amp;L,<span class="params">int</span> <span class="params">low</span>, <span class="params">int</span> <span class="params">high</span>)</span>&#123;</span><br><span class="line">  <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="number">0</span>]</span> = <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">row</span>]</span>;                                          <span class="comment">//用子表的第一个记录作枢轴记录</span></span><br><span class="line">  privotekey = <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">low</span>]</span>.key;                                  <span class="comment">//枢轴记录关键字</span></span><br><span class="line">  <span class="keyword">while</span>(low &lt; high)&#123;                                          <span class="comment">//从表的两端交替地向中间扫描</span></span><br><span class="line">    <span class="keyword">while</span>(low &lt; high<span class="operator"> &amp;&amp; </span><span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">high</span>]</span>.key &gt;= pivotekey) --high;</span><br><span class="line">    <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">row</span>]</span> = <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">high</span>]</span>;                                     <span class="comment">//将比枢轴记录小的记录移到低端</span></span><br><span class="line">    <span class="keyword">while</span>(low &lt; high<span class="operator"> &amp;&amp; </span><span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">low</span>]</span>.key &lt;= privotekey) ++low;</span><br><span class="line">    <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">high</span>]</span> = <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">low</span>]</span>;                                     <span class="comment">//将比枢轴记录大的记录移到高端</span></span><br><span class="line">  &#125;</span><br><span class="line">  <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="identifier">low</span>]</span> = <span class="module-access"><span class="module"><span class="identifier">L</span>.</span></span>r<span class="literal">[<span class="number">0</span>]</span>;                                          <span class="comment">//枢轴记录到位</span></span><br><span class="line">  return low;                                                 <span class="comment">//返回枢轴位置</span></span><br><span class="line">&#125;<span class="comment">//Partition</span></span><br></pre></td></tr></table></figure>
<h2 id="static"><a href="#static" class="headerlink" title="static"></a><strong>static</strong></h2><ol>
<li><p>静态变量</p>
<ul>
<li>静态变量：又称为类变量，也就是说这个变量属于类的，类所有的实例都共享静态变量，可以直接通过类名来访问它；静态变量在内存中只存在一份。</li>
<li>实例变量：每创建一个实例就会产生一个实例变量，它与该实例同生共死。</li>
</ul>
</li>
</ol>
<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title class_">A</span> &#123;</span><br><span class="line">    <span class="keyword">private</span> <span class="type">int</span> x;         <span class="comment">// 实例变量</span></span><br><span class="line">    <span class="keyword">private</span> <span class="type">static</span> <span class="type">int</span> y;  <span class="comment">// 静态变量</span></span><br><span class="line"> </span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="type">static</span> <span class="type">void</span> <span class="title">main</span><span class="params">(<span class="type">String</span>[] args)</span> </span>&#123;</span><br><span class="line">        <span class="comment">// int x = A.x;  // Non-static field &#x27;x&#x27; cannot be referenced from a static context</span></span><br><span class="line">        A a = <span class="keyword">new</span> <span class="built_in">A</span>();</span><br><span class="line">        <span class="type">int</span> x = a.x;</span><br><span class="line">        <span class="type">int</span> y = A.y;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ol>
<li>静态方法</li>
</ol>
<p>静态方法在类加载的时候就存在了，它不依赖于任何实例。所以静态方法必须有实现，也就是说它不能是抽象方法（abstract）。<br><figure class="highlight csharp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">abstract</span> <span class="keyword">class</span> <span class="title">A</span> &#123;</span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">func1</span>()</span>&#123;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="comment">// public abstract static void func2();  // Illegal combination of modifiers: &#x27;abstract&#x27; and &#x27;static&#x27;</span></span><br><span class="line"></span><br><span class="line">  <span class="comment">//也就是说abstract和static不能修饰同一个方法</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>只能访问所属类的静态字段和静态方法，方法中不能有 this 和 super 关键字。<br><figure class="highlight csharp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="keyword">class</span> <span class="title">A</span> &#123;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">static</span> <span class="built_in">int</span> x;</span><br><span class="line">    <span class="keyword">private</span> <span class="built_in">int</span> y;</span><br><span class="line"> </span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">func1</span>()</span>&#123;</span><br><span class="line">        <span class="built_in">int</span> a = x;</span><br><span class="line">        <span class="comment">// int b = y;  // Non-static field &#x27;y&#x27; cannot be referenced from a static context</span></span><br><span class="line">        <span class="comment">// int b = this.y;     // &#x27;A.this&#x27; cannot be referenced from a static context</span></span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<ol>
<li>静态语句块</li>
</ol>
<p>静态语句块在类初始化时运行一次</p>
<ol>
<li>静态内部类</li>
</ol>
<p>非静态内部类依赖于外部类的实例，而静态内部类不需要。</p>
<figure class="highlight haxe"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">OuterClass</span> </span>&#123;</span><br><span class="line">    <span class="class"><span class="keyword">class</span> <span class="title">InnerClass</span> </span>&#123;</span><br><span class="line">    &#125;</span><br><span class="line"> </span><br><span class="line">    <span class="keyword">static</span> <span class="class"><span class="keyword">class</span> <span class="title">StaticInnerClass</span> </span>&#123;</span><br><span class="line">    &#125;</span><br><span class="line"> </span><br><span class="line">    <span class="keyword">public</span> <span class="keyword">static</span> void main(<span class="keyword">String</span>[] args) &#123;</span><br><span class="line">        <span class="comment">// InnerClass innerClass = new InnerClass(); // &#x27;OuterClass.this&#x27; cannot be referenced from a static context</span></span><br><span class="line">        OuterClass outerClass = <span class="keyword">new</span> <span class="type">OuterClass</span>();</span><br><span class="line">        InnerClass innerClass = outerClass.<span class="keyword">new</span> <span class="type">InnerClass</span>();</span><br><span class="line">        StaticInnerClass staticInnerClass = <span class="keyword">new</span> <span class="type">StaticInnerClass</span>();</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>静态内部类不能访问外部类的非静态的变量和方法。</p>
<h2 id="TCP与UDP"><a href="#TCP与UDP" class="headerlink" title="TCP与UDP"></a><strong>TCP与UDP</strong></h2><p>TCP (Transmission Control Protocol)和UDP(User Datagram Protocol)协议属于传输层协议。</p>
<p>其中TCP提供IP环境下的数据可靠传输，它提供的服务包括数据流传送、可靠性、有效流控、全双工操作和多路复用。通过面向连接、端到端和可靠的数据包发送。通俗说，它是事先为所发送的数据开辟出连接好的通道，然后再进行数据发送；一般来说，TCP对应的是可靠性要求高的应用。</p>
<p>而UDP则不为IP提供可靠性、流控或差错恢复功能。UDP对应的则是可靠性要求低、传输经济的应用。</p>
<p>TCP支持的应用协议主要有：Telnet、FTP、SMTP等；</p>
<p><strong>TCP对应的协议</strong></p>
<ul>
<li><p>FTP：定义了文件传输协议，使用21端口。</p>
</li>
<li><p>Telnet：一种用于远程登陆的端口，使用23端口，用户可以以自己的身份远程连接到计算机上，可提供基于DOS模式下的通信服务。</p>
</li>
<li><p>SMTP：邮件传送协议，用于发送邮件。服务器开放的是25号端口。</p>
</li>
<li><p>POP3：它是和SMTP对应，POP3用于接收邮件。POP3协议所用的是110端口。</p>
</li>
<li><p>HTTP：是从Web服务器传输超文本到本地浏览器的传送协议。</p>
</li>
</ul>
<p><strong>UDP对应的协议</strong></p>
<ul>
<li><p>DNS：用于域名解析服务，将域名地址转换为IP地址。DNS用的是53号端口。</p>
</li>
<li><p>SNMP：简单网络管理协议，使用161号端口，是用来管理网络设备的。由于网络设备很多，无连接的服务就体现出其优势。</p>
</li>
<li><p>TFTP(Trival File transport Protocal)，简单文件传输协议，该协议在熟知端口69上使用UDP服务。</p>
</li>
</ul>
<img src="/wang-cheng/2022/03/23/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0-%E4%B8%80/TCP%E4%B8%8EUDP.png" class title="TCP与UDP">
<h2 id="有一条TCP连接，它的最大报文段长度为4KB，TCP拥塞窗口为24KB，这时候发生超时，那么该拥塞窗口变为了"><a href="#有一条TCP连接，它的最大报文段长度为4KB，TCP拥塞窗口为24KB，这时候发生超时，那么该拥塞窗口变为了" class="headerlink" title="有一条TCP连接，它的最大报文段长度为4KB，TCP拥塞窗口为24KB，这时候发生超时，那么该拥塞窗口变为了"></a><strong>有一条TCP连接，它的最大报文段长度为4KB，TCP拥塞窗口为24KB，这时候发生超时，那么该拥塞窗口变为了</strong></h2><p>TCP报文中，当发生超时事件，阈值被设置成当前拥塞窗口的一半，而拥塞窗口被设为一个最大报文段，也就是4KB。</p>
<p>实际上，慢开始、拥塞避免算法、快重传和快恢复几种算法应该是同时应用在拥塞控制中的，当发送方检测到超时的时候就采用慢开始和拥塞避免，当发送方接收到冗余ACK时就采用快重传和快恢复。因此超时应采用慢开始拥塞避免算法，拥塞窗口的值被设为1个单位；即拥塞窗口的大小为1*4KB=4KB。</p>
<h2 id="线程同步问题"><a href="#线程同步问题" class="headerlink" title="线程同步问题"></a><strong>线程同步问题</strong></h2><p>临界区（Critical Section）：适合一个进程内的多线程访问公共区域或代码段时使用(临界区只能用于单个进程内多线程的同步)</p>
<p>互斥量 (Mutex)：适合不同进程内多线程访问公共区域或代码段时使用，与临界区相似(互斥量还能用于多个进程间多线程的同步)</p>
<p>事件（Event）：通过线程间触发事件实现同步互斥。</p>
<p>信号量（Semaphore）：与临界区和互斥量不同，可以实现多个线程同时访问公共区域数据，原理与操作系统中PV操作类似，先设置一个访问公共区域的线程最大连接数，每有一个线程访问共享区资源数就减一，直到资源数小于等于零。</p>
<h2 id="死锁解决时机"><a href="#死锁解决时机" class="headerlink" title="死锁解决时机"></a><strong>死锁解决时机</strong></h2><p>按照死锁解决时机的不同分为，预防死锁、避免死锁、检测并解除死锁三个阶段</p>
<p>银行家算法是用在避免死锁阶段的。</p>
<h2 id="矩阵相乘"><a href="#矩阵相乘" class="headerlink" title="矩阵相乘"></a><strong>矩阵相乘</strong></h2><p>根据矩阵相乘的原理得知，m1<em>n的矩阵和n</em>m2的矩阵相乘， 需要做m1<em>n</em>m2次乘法运算，因此需要优先计算n更大的矩阵，这样会最大地减少乘法运算的次数</p>
<h2 id="不可能是快速排序第2趟排序结果问题"><a href="#不可能是快速排序第2趟排序结果问题" class="headerlink" title="不可能是快速排序第2趟排序结果问题"></a><strong>不可能是快速排序第2趟排序结果问题</strong></h2><p>每趟排序就有一个元素排在了最终的位置上。那么就是说，第n趟结束，<strong>至少</strong>有n个元素已经排在了最终的位置上。</p>
<p>所以我们把最终排序结果写出来：然后计算在最终位置上的个数就可以</p>
<h2 id="Vector-ArrayList-LinkedList的不同场景下的性能差别"><a href="#Vector-ArrayList-LinkedList的不同场景下的性能差别" class="headerlink" title="Vector, ArrayList, LinkedList的不同场景下的性能差别"></a><strong>Vector, ArrayList, LinkedList的不同场景下的性能差别</strong></h2><p>LinkedList是一个双向链表结构.线程不安全.适合于中间部位添加和删除.初始值是16，然后扩容1.5倍</p>
<p>ArrayList 是一个数组结构.线程不安全.适合于查询和修改，以及尾部的添加和删除. </p>
<p>Vector 是一个数组结构。但是关键的添加，删除等方法都已经用synchronized修饰，是线程安全的.适合于查询，以及尾部的添加和删除.扩容方式为2倍</p>
<h2 id="通讯中阻塞（blocking）-非阻塞（non-blocking-与-同步-异步IO的区别"><a href="#通讯中阻塞（blocking）-非阻塞（non-blocking-与-同步-异步IO的区别" class="headerlink" title="通讯中阻塞（blocking）/非阻塞（non-blocking 与 同步/异步IO的区别"></a><strong>通讯中阻塞（blocking）/非阻塞（non-blocking 与 同步/异步IO的区别</strong></h2><p>同步／异步主要针对客户端：</p>
<ul>
<li><p>同步：就是当客户端发出一个功能调用时，在没有得到结果之前，该调用就不返回。也就是说必须一件一件的事情去做，等一件做完了才能去做下一件。</p>
</li>
<li><p>异步：就是当客户端发出一个功能调用时，调用者不用等接收方发出响应。实际处理这个调用的部件在完成后，会通过状态，通知和回调来通知调用者。客户端可以接着去做 后面的事情。</p>
</li>
</ul>
<p>虽然主要是针对客户端，但是服务器端不是完全没有关系的，同步／异步必须配合服务器端才能实现。同步／异步是由客户端自己控制，但是服务器端是否阻塞/非阻塞，客户端完全不需要关心。</p>
<p>阻塞／非阻塞主要是针对服务器端：</p>
<ul>
<li><p>阻塞：阻塞调用是指服务器端被调用者调用结果返回之前，当前线程会被挂起。调用线程只有在得到结果之后才会返回。</p>
</li>
<li><p>非阻塞：指在不能立即得到结果之前，该调用不会阻塞当前线程。</p>
</li>
</ul>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/wang-cheng/tags/%E5%81%9A%E9%A2%98%E7%AC%94%E8%AE%B0/" rel="tag"># 做题笔记</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/wang-cheng/2022/03/23/JVM%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" rel="prev" title="JVM学习笔记">
      <i class="fa fa-chevron-left"></i> JVM学习笔记
    </a></div>
      <div class="post-nav-item">
    <a href="/wang-cheng/2022/03/25/%E9%9D%A2%E8%AF%95%E9%A2%98-%E4%B8%83/" rel="next" title="面试题(七)">
      面试题(七) <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E7%89%9B%E5%AE%A2%E7%BD%91%E5%88%B7%E9%A2%98%E7%AC%94%E8%AE%B0"><span class="nav-number">1.</span> <span class="nav-text">牛客网刷题笔记</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E4%BC%98%E5%8C%96%E9%97%AE%E9%A2%98"><span class="nav-number">1.1.</span> <span class="nav-text">数据库优化问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#floor%E3%80%81ceil%E5%87%BD%E6%95%B0%E9%97%AE%E9%A2%98"><span class="nav-number">1.2.</span> <span class="nav-text">floor、ceil函数问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%90%8C%E6%AD%A5%E9%94%81%E6%9C%BA%E5%88%B6"><span class="nav-number">1.3.</span> <span class="nav-text">同步锁机制</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E7%B1%BB%E9%97%AE%E9%A2%98"><span class="nav-number">1.4.</span> <span class="nav-text">设计模式类问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93%E5%BC%95%E6%93%8E%E7%B1%BB%E9%97%AE%E9%A2%98"><span class="nav-number">1.5.</span> <span class="nav-text">数据库引擎类问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#SQL%E4%B8%ADlimit%E7%94%A8%E6%B3%95"><span class="nav-number">1.6.</span> <span class="nav-text">SQL中limit用法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%8C%E5%85%A8%E4%BA%8C%E5%8F%89%E6%A0%91"><span class="nav-number">1.7.</span> <span class="nav-text">完全二叉树</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%A0%86%E6%8E%92%E5%BA%8F"><span class="nav-number">1.8.</span> <span class="nav-text">堆排序</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8C%E5%8F%89%E6%A0%91%E8%BD%AC%E5%A0%86"><span class="nav-number">1.9.</span> <span class="nav-text">二叉树转堆</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F%E7%AE%97%E6%B3%95"><span class="nav-number">1.10.</span> <span class="nav-text">快速排序算法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#static"><span class="nav-number">1.11.</span> <span class="nav-text">static</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#TCP%E4%B8%8EUDP"><span class="nav-number">1.12.</span> <span class="nav-text">TCP与UDP</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9C%89%E4%B8%80%E6%9D%A1TCP%E8%BF%9E%E6%8E%A5%EF%BC%8C%E5%AE%83%E7%9A%84%E6%9C%80%E5%A4%A7%E6%8A%A5%E6%96%87%E6%AE%B5%E9%95%BF%E5%BA%A6%E4%B8%BA4KB%EF%BC%8CTCP%E6%8B%A5%E5%A1%9E%E7%AA%97%E5%8F%A3%E4%B8%BA24KB%EF%BC%8C%E8%BF%99%E6%97%B6%E5%80%99%E5%8F%91%E7%94%9F%E8%B6%85%E6%97%B6%EF%BC%8C%E9%82%A3%E4%B9%88%E8%AF%A5%E6%8B%A5%E5%A1%9E%E7%AA%97%E5%8F%A3%E5%8F%98%E4%B8%BA%E4%BA%86"><span class="nav-number">1.13.</span> <span class="nav-text">有一条TCP连接，它的最大报文段长度为4KB，TCP拥塞窗口为24KB，这时候发生超时，那么该拥塞窗口变为了</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%BA%BF%E7%A8%8B%E5%90%8C%E6%AD%A5%E9%97%AE%E9%A2%98"><span class="nav-number">1.14.</span> <span class="nav-text">线程同步问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%AD%BB%E9%94%81%E8%A7%A3%E5%86%B3%E6%97%B6%E6%9C%BA"><span class="nav-number">1.15.</span> <span class="nav-text">死锁解决时机</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%9F%A9%E9%98%B5%E7%9B%B8%E4%B9%98"><span class="nav-number">1.16.</span> <span class="nav-text">矩阵相乘</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%8D%E5%8F%AF%E8%83%BD%E6%98%AF%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F%E7%AC%AC2%E8%B6%9F%E6%8E%92%E5%BA%8F%E7%BB%93%E6%9E%9C%E9%97%AE%E9%A2%98"><span class="nav-number">1.17.</span> <span class="nav-text">不可能是快速排序第2趟排序结果问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Vector-ArrayList-LinkedList%E7%9A%84%E4%B8%8D%E5%90%8C%E5%9C%BA%E6%99%AF%E4%B8%8B%E7%9A%84%E6%80%A7%E8%83%BD%E5%B7%AE%E5%88%AB"><span class="nav-number">1.18.</span> <span class="nav-text">Vector, ArrayList, LinkedList的不同场景下的性能差别</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%80%9A%E8%AE%AF%E4%B8%AD%E9%98%BB%E5%A1%9E%EF%BC%88blocking%EF%BC%89-%E9%9D%9E%E9%98%BB%E5%A1%9E%EF%BC%88non-blocking-%E4%B8%8E-%E5%90%8C%E6%AD%A5-%E5%BC%82%E6%AD%A5IO%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="nav-number">1.19.</span> <span class="nav-text">通讯中阻塞（blocking）&#x2F;非阻塞（non-blocking 与 同步&#x2F;异步IO的区别</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">王诚</p>
  <div class="site-description" itemprop="description">命运对勇士低语，你无法抵御风暴；勇士低声回应，我就是风暴</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/wang-cheng/archives/">
        
          <span class="site-state-item-count">32</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/wang-cheng/tags/">
          
        <span class="site-state-item-count">12</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">王诚</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/wang-cheng/lib/anime.min.js"></script>
  <script src="/wang-cheng/lib/velocity/velocity.min.js"></script>
  <script src="/wang-cheng/lib/velocity/velocity.ui.min.js"></script>

<script src="/wang-cheng/js/utils.js"></script>

<script src="/wang-cheng/js/motion.js"></script>


<script src="/wang-cheng/js/schemes/pisces.js"></script>


<script src="/wang-cheng/js/next-boot.js"></script>




  















  

  

  

</body>
</html>
